package com.jx.mlxg.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 
 * @TableName orders
 */
@TableName(value ="orders")
@Data
public class Orders {

    //返回字段

    @TableField(exist = false)
    private Boolean isSend;

    @TableField(exist = false)
    private Long createStamp;

    @TableField(exist = false)
    private ApprovalRecord approvalRecord;

    @TableField(exist = false)
    private String username;

    @TableField(exist = false)
    private Integer hasBoughtCount;

    @TableField(exist = false)
    private List statistics;

    @TableField(exist = false)
    private String[] commonOperations;
    // 关联字段
    @TableField(exist = false)
    private Addresses receiver;
    // 关联字段
    @TableField(exist = false)
    private List<Product> products;
    /**
     * 
     */
    @TableId(value = "order_id", type = IdType.AUTO)
    private String orderId;

    /**
     * 
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 
     */
    @TableField(value = "order_date")
    private LocalDateTime orderDate;

    /**
     * 
     */
    @TableField(value = "required_date")
    private LocalDateTime requiredDate;

    /**
     * 
     */
    @TableField(value = "shipped_date")
    private LocalDateTime shippedDate;

    /**
     * 
     */
    @TableField(value = "status")
    private String status;

    /**
     * 
     */
    @TableField(value = "total_amount")
    private BigDecimal totalAmount;

//    /**
//     *
//     * */
//    @TableField(value = "address_id")
//    private Integer addressId;

    /**
     *
     * */
    @TableField(value = "openid")
    private String openid;

    /**
     *
     * */
    @TableField(value = "discount_amount")
    private BigDecimal discountAmount;

    /**
     *
     * */
    @TableField(value = "tracking_number")
    private String trackingNumber;//快递单号

    /**
     *
     * */
    @TableField(value = "remark")
    private String remark;

    /**
     *
     * */
    @TableField(value = "real_amount")
    private BigDecimal realAmount;
    /**
     * 
     */
    @TableField(value = "created_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;


    /**
     * 
     */
    @TableField(value = "updated_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime  updatedAt;



}